package br.com.petshow.app;

import java.io.IOException;
import java.net.URL;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class Aplicacao extends Application {

	public final static String TITULO = "Pet Show!!!";
	public final static String URL_MENU = "/br/com/petshow/view/menu.fxml";
	public final static String URL_TIPOS = "/br/com/petshow/view/tipos.fxml";
	public final static String URL_SERVICOS = "/br/com/petshow/view/servicos.fxml";
	public final static String URL_DONOS= "/br/com/petshow/view/donos.fxml";
	
	private static Stage palco;
	
	public static void main(String[] args) {
		launch(args);
	}
	
	@Override
	public void start(Stage palco) throws Exception {
		this.palco = palco;
		loadUrl(URL_MENU);	}
	
	public static void loadUrl(String url) {
		try {
			Parent root = FXMLLoader.load(Aplicacao.class.getResource(url));
			Scene cena = new Scene(root);
			palco.setScene(cena);
			palco.setTitle(TITULO);
			palco.show();
			
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
